﻿@if (Request.IsAuthenticated)
{

    <li>
        <a href="#">Привет,  @User.Identity.Name</a>
    </li>

    <li class="active">
        <a href="javascript:document.getElementById('logoutForm').submit()">Выйти</a>
    </li>

    using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))
    {
        @Html.AntiForgeryToken()
    }

}
else
{
    <li class="active">
        @Html.ActionLink("Войти", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
    </li>

}
